<?php
/**
 * @package qBase
 * @subpackage web
 */


/**
 * Objects implementing QIWebListener are triggered on web requests
 * These objects should have only ONE instance per execution as they are identified by their class name
 * 
 * @package qBase
 * @subpackage web
 */
interface QIWebListener
{
	/**
	 * Interprets the request and decides what to do with it
	 *
	 * @param QWebRequest $request
	 * @param QIWebListener $parent the parent listener that is calling the current QIWebListener or null if is the first one
	 */
	public function processRequest(QWebRequest $request, QIWebListener $parent = null);
	/**
	 * Gets the parent QIWebListener
	 *
	 * @return QIWebListener
	 */
	public function getParentWebListener();
	/**
	 * Gets the Url manager of the Listener if any is set
	 *
	 * @return QUrlManager
	 */
	public function getUrlManager();
	/**
	 * Gets the call stack of the current QIWebListener as a string array
	 *
	 * @return array
	 */
	public function getCallStack();
	/**
	 * Gets the ID of the web listener
	 *
	 * @return string
	 */
	public function getIdWebListener();
}

?>